package com.cloud.demo.common.web.domain.respomse;


import com.cloud.demo.common.enums.ResultEnum;
import lombok.Data;

@Data
public class Result {
    private int code;
    private String message;
    private Object object;

    public Result() {
    }

    public Result(int code, String message, Object o) {
        this.code = code;
        this.message = message;
        this.object = o;
    }
    public static Result build(ResultEnum resultEnum, Object o ){
        return new Result(resultEnum.getCode(),resultEnum.getMessage(),o);
    }

}
